(0) Obligation:

Runtime Complexity TRS:
The TRS R consists of the following rules:

plus(x, 0) → x
plus(x, s(y)) → s(plus(x, y))
d(0) → 0
d(s(x)) → s(s(d(x)))
q(0) → 0
q(s(x)) → s(plus(q(x), d(x)))

Rewrite Strategy: INNERMOST

(1) CpxTrsToCdtProof (BOTH BOUNDS(ID, ID) transformation)

Converted CpxTRS to CDT

(2) Obligation:

Complexity Dependency Tuples Problem
Rules:

plus(z0, 0) → z0
plus(z0, s(z1)) → s(plus(z0, z1))
d(0) → 0
d(s(z0)) → s(s(d(z0)))
q(0) → 0
q(s(z0)) → s(plus(q(z0), d(z0)))
Tuples:

PLUS(z0, s(z1)) → c1(PLUS(z0, z1))
D(s(z0)) → c3(D(z0))
Q(s(z0)) → c5(PLUS(q(z0), d(z0)), Q(z0), D(z0))
S tuples:

PLUS(z0, s(z1)) → c1(PLUS(z0, z1))
D(s(z0)) → c3(D(z0))
Q(s(z0)) → c5(PLUS(q(z0), d(z0)), Q(z0), D(z0))
K tuples:none
Defined Rule Symbols:

plus, d, q

Defined Pair Symbols:

PLUS, D, Q

Compound Symbols:

c1, c3, c5

(3) CdtPolyRedPairProof (UPPER BOUND (ADD(O(n^1))) transformation)

Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.

Q(s(z0)) → c5(PLUS(q(z0), d(z0)), Q(z0), D(z0))
We considered the (Usable) Rules:

q(0) → 0
q(s(z0)) → s(plus(q(z0), d(z0)))
d(0) → 0
d(s(z0)) → s(s(d(z0)))
plus(z0, 0) → z0
plus(z0, s(z1)) → s(plus(z0, z1))
And the Tuples:

PLUS(z0, s(z1)) → c1(PLUS(z0, z1))
D(s(z0)) → c3(D(z0))
Q(s(z0)) → c5(PLUS(q(z0), d(z0)), Q(z0), D(z0))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(0) = [5]   
POL(D(x1)) = 0   
POL(PLUS(x1, x2)) = [1]   
POL(Q(x1)) = x1   
POL(c1(x1)) = x1   
POL(c3(x1)) = x1   
POL(c5(x1, x2, x3)) = x1 + x2 + x3   
POL(d(x1)) = [3] + [2]x1   
POL(plus(x1, x2)) = [4] + [3]x1 + [2]x2   
POL(q(x1)) = [5] + [2]x1   
POL(s(x1)) = [4] + x1   

(4) Obligation:

Complexity Dependency Tuples Problem
Rules:

plus(z0, 0) → z0
plus(z0, s(z1)) → s(plus(z0, z1))
d(0) → 0
d(s(z0)) → s(s(d(z0)))
q(0) → 0
q(s(z0)) → s(plus(q(z0), d(z0)))
Tuples:

PLUS(z0, s(z1)) → c1(PLUS(z0, z1))
D(s(z0)) → c3(D(z0))
Q(s(z0)) → c5(PLUS(q(z0), d(z0)), Q(z0), D(z0))
S tuples:

PLUS(z0, s(z1)) → c1(PLUS(z0, z1))
D(s(z0)) → c3(D(z0))
K tuples:

Q(s(z0)) → c5(PLUS(q(z0), d(z0)), Q(z0), D(z0))
Defined Rule Symbols:

plus, d, q

Defined Pair Symbols:

PLUS, D, Q

Compound Symbols:

c1, c3, c5

(5) CdtPolyRedPairProof (UPPER BOUND (ADD(O(n^2))) transformation)

Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.

D(s(z0)) → c3(D(z0))
We considered the (Usable) Rules:

q(0) → 0
q(s(z0)) → s(plus(q(z0), d(z0)))
d(0) → 0
d(s(z0)) → s(s(d(z0)))
plus(z0, 0) → z0
plus(z0, s(z1)) → s(plus(z0, z1))
And the Tuples:

PLUS(z0, s(z1)) → c1(PLUS(z0, z1))
D(s(z0)) → c3(D(z0))
Q(s(z0)) → c5(PLUS(q(z0), d(z0)), Q(z0), D(z0))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(0) = 0   
POL(D(x1)) = [2]x1   
POL(PLUS(x1, x2)) = 0   
POL(Q(x1)) = x12   
POL(c1(x1)) = x1   
POL(c3(x1)) = x1   
POL(c5(x1, x2, x3)) = x1 + x2 + x3   
POL(d(x1)) = 0   
POL(plus(x1, x2)) = 0   
POL(q(x1)) = 0   
POL(s(x1)) = [2] + x1   

(6) Obligation:

Complexity Dependency Tuples Problem
Rules:

plus(z0, 0) → z0
plus(z0, s(z1)) → s(plus(z0, z1))
d(0) → 0
d(s(z0)) → s(s(d(z0)))
q(0) → 0
q(s(z0)) → s(plus(q(z0), d(z0)))
Tuples:

PLUS(z0, s(z1)) → c1(PLUS(z0, z1))
D(s(z0)) → c3(D(z0))
Q(s(z0)) → c5(PLUS(q(z0), d(z0)), Q(z0), D(z0))
S tuples:

PLUS(z0, s(z1)) → c1(PLUS(z0, z1))
K tuples:

Q(s(z0)) → c5(PLUS(q(z0), d(z0)), Q(z0), D(z0))
D(s(z0)) → c3(D(z0))
Defined Rule Symbols:

plus, d, q

Defined Pair Symbols:

PLUS, D, Q

Compound Symbols:

c1, c3, c5

(7) CdtPolyRedPairProof (UPPER BOUND (ADD(O(n^2))) transformation)

Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.

PLUS(z0, s(z1)) → c1(PLUS(z0, z1))
We considered the (Usable) Rules:

q(0) → 0
q(s(z0)) → s(plus(q(z0), d(z0)))
d(0) → 0
d(s(z0)) → s(s(d(z0)))
plus(z0, 0) → z0
plus(z0, s(z1)) → s(plus(z0, z1))
And the Tuples:

PLUS(z0, s(z1)) → c1(PLUS(z0, z1))
D(s(z0)) → c3(D(z0))
Q(s(z0)) → c5(PLUS(q(z0), d(z0)), Q(z0), D(z0))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(0) = 0   
POL(D(x1)) = 0   
POL(PLUS(x1, x2)) = [1] + x2   
POL(Q(x1)) = x12   
POL(c1(x1)) = x1   
POL(c3(x1)) = x1   
POL(c5(x1, x2, x3)) = x1 + x2 + x3   
POL(d(x1)) = [2]x1   
POL(plus(x1, x2)) = 0   
POL(q(x1)) = x12   
POL(s(x1)) = [1] + x1   

(8) Obligation:

Complexity Dependency Tuples Problem
Rules:

plus(z0, 0) → z0
plus(z0, s(z1)) → s(plus(z0, z1))
d(0) → 0
d(s(z0)) → s(s(d(z0)))
q(0) → 0
q(s(z0)) → s(plus(q(z0), d(z0)))
Tuples:

PLUS(z0, s(z1)) → c1(PLUS(z0, z1))
D(s(z0)) → c3(D(z0))
Q(s(z0)) → c5(PLUS(q(z0), d(z0)), Q(z0), D(z0))
S tuples:none
K tuples:

Q(s(z0)) → c5(PLUS(q(z0), d(z0)), Q(z0), D(z0))
D(s(z0)) → c3(D(z0))
PLUS(z0, s(z1)) → c1(PLUS(z0, z1))
Defined Rule Symbols:

plus, d, q

Defined Pair Symbols:

PLUS, D, Q

Compound Symbols:

c1, c3, c5

(9) SIsEmptyProof (EQUIVALENT transformation)

The set S is empty

(10) BOUNDS(O(1), O(1))